home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / LGP250S1.ZIP / src / libgplus.5 / libgplus / gplus-in / time.h < prev    next >
C/C++ Source or Header  |  1993-05-03  |  2KB  |  104 lines

  1. #ifndef _G_time_h
  2. #define _G_time_h
  3.  
  4. extern "C" {
  5.  
  6. #ifdef __time_h_recursive
  7. #include_next <time.h>
  8. #else
  9. #define __time_h_recursive
  10.  
  11. #include <_G_config.h>
  12.  
  13. // A clean way to use and/or define time_t might allow removal of this crud.
  14. #ifndef __sys_time_h_recursive
  15. #define time __hide_time
  16. #define clock __hide_clock
  17. #define difftime __hide_difftime
  18. #define gmtime __hide_gmtime
  19. #define localtime __hide_localtime
  20. #define ctime __hide_ctime
  21. #define asctime __hide_asctime
  22. #define strftime __hide_strftime
  23. #endif
  24. #define mktime __hide_mktime
  25. #define tzset __hide_tzset
  26. #define tzsetwall __hide_tzsetwall
  27. #define getitimer __hide_getitimer
  28. #define setitimer __hide_setitimer
  29. #define gettimeofday __hide_gettimeofday
  30. #define settimeofday __hide_settimeofday
  31.  
  32. #ifdef VMS
  33.     struct  unix_time
  34.     {
  35.         long int    tv_sec;
  36.         long int    tv_usec;
  37.     };
  38.  
  39.     struct rusage
  40.     {
  41.         struct unix_time    ru_utime;
  42.     };
  43.  
  44. #define RUSAGE_SELF 0        //define it, it will be unused
  45. #else
  46. #ifdef hpux
  47. #define _INCLUDE_POSIX_SOURCE
  48. #endif
  49.  
  50. #include_next <time.h>
  51. #endif
  52. #undef __time_h_recursive
  53.  
  54. #define time_h 1
  55.  
  56. #undef time
  57. #undef clock
  58. #undef difftime
  59. #undef gmtime 
  60. #undef localtime 
  61. #undef asctime 
  62. #undef ctime 
  63. #undef mktime
  64. #undef strftime 
  65. #undef tzset 
  66. #undef tzsetwall 
  67. #undef getitimer
  68. #undef setitimer
  69. #undef gettimeofday
  70. #undef settimeofday
  71.  
  72. extern char* asctime _G_ARGS((const struct tm*));
  73. extern char* ctime _G_ARGS((const _G_time_t*));
  74. double difftime _G_ARGS((_G_time_t, _G_time_t));
  75. extern struct tm* gmtime _G_ARGS((const _G_time_t*));
  76. extern struct tm* localtime _G_ARGS((const _G_time_t*));
  77. extern _G_time_t mktime(struct tm*);
  78. extern _G_size_t strftime _G_ARGS((char*,_G_size_t,const char*,const struct tm*));
  79. extern void tzset();
  80. extern void tzsetwall();
  81.  
  82. extern int getitimer(int, struct itimerval*);
  83. extern int setitimer _G_ARGS((int, const struct itimerval*,struct itimerval*));
  84. extern int gettimeofday(struct timeval*, struct timezone*);
  85. extern int settimeofday _G_ARGS((const struct timeval*,const struct timezone*));
  86. extern int stime _G_ARGS((const _G_time_t*));
  87. extern int dysize(int);
  88.  
  89. #if defined(___AIX__)
  90. int clock (void);
  91. #elif defined(hpux)
  92. unsigned long      clock(void);
  93. #else
  94. long      clock(void);
  95. #endif
  96. _G_time_t      time(_G_time_t*);
  97. unsigned  ualarm(unsigned, unsigned);
  98. unsigned  usleep(unsigned);
  99. void      profil _G_ARGS((unsigned short*, _G_size_t, unsigned int, unsigned));
  100.  
  101. #endif
  102. }
  103. #endif
  104.